#!/usr/bin/env node

// 引入readline模块
const readline = require('readline')

// 创建readline接口实例
const rl = readline.createInterface({
    input:process.stdin,
    output:process.stdout
})
rl.on('line', line => {
    const dataList=line.split('\t');
    if(dataList[1].indexOf(':')>0){
        const split=dataList[1].split(':');
        const key=split[0];
        let value="";
        for (let i = 2; i < dataList.length; i++) {
            value+=(`A:${split[1]}:${dataList[i]}`)
        }
        console.log(`${key}\t${value}`)
    }else{
        for (const i of items) {
            const value=`B:${line}`;
            console.log(`${i}\t${value}`)
        }
    }
})
rl.on("close", () => {
    process.exit(0)
})